<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Aboutus extends MY_Controller {
	//构造函数
	public function __construct()
	{
		parent::__construct();
		$this->new_catgory = $this->home->get_category_by_id(1);
	}
	public function index(){
		$this->article();
	}
	public function article()
	{
		$data = array();
		$data['cates'] = $this->new_catgory;
		$current_cat = current($data['cates']['data']);
		$cid = $this->uri->segment(3);
		$data['recentid'] = $cid ==false ? $current_cat['cid']: $cid;
		$data['catname'] = 'About Us';
		$data['cur_catname'] = $data['cates']['data'][$data['recentid']]['catname'];

		$data['ainfo'] = $this->home->get_ainfo_by_cid($data['recentid']);
		template('about/about_info',$data);
	}

	public function leadership()
	{		
		$data = array();
		$data['cates'] = $this->new_catgory;
		$data['recentid'] = '4';
		$data['catname'] = 'About Us';
		$data['cur_catname'] = 'leadership';
		template('about/leadership',$data);
	}

	public function structureoforganizations()
	{
		$data = array();
		$data['cates'] = $this->new_catgory;
		$data['recentid'] = '5';
		$data['catname'] = 'About Us';
		$data['cur_catname'] = 'structure of organizations';
		$tmpStructs = $this->home->get_all_struct();
		$data['structs'] = channelLevel($tmpStructs,0,"&nbsp",'st_id','st_pid');
		template('about/structure',$data);	
	}
}